<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="icon" href="favicon.ico" type="image/x-icon"/>
        <title>关注者列表-微信管理-{$site.BACK_NAME}</title>
        <include file="Public:jscss" />
    </head>
    <body>
        <div class="wrap">
            <include file="Public:head" />
            <div class="mainBody">
                <include file="Public:left" />
                <div id="Right">
                    <div class="Item hr">
                        <div class="current">微信关注者列表</div>
                    </div>
					<form action="{:U('Member/inside')}" method="post" id="quickForm">
                        <b>快速搜索：</b>&nbsp;
                        <input placeholder="请输入关键字" id="kwd" class="input" type="text" name="kwd" value="" /> &nbsp;
						<input type="submit" class="btn quickSubmit" value='搜索'/>
                    </form>
					<form action="" method="post" id="opForm">
						<input id="openid" type="hidden" name="openid" />
						<input id="groupid" type="hidden" name="groupid" />
						<input id="remark" type="hidden" name="remark" />
					</form>
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab">
						<thead>
							<tr>
								<td>OPENID</td>
								<td>昵称</td>
								<td>是否订阅</td>
								<td>性别</td>
								<td>区域</td>
								<td>关注时间</td>
								<td>分组</td>
								<td>备注</td>
								<td>操作</td>
							</tr>
						</thead>
						<tbody>
							<volist name="list" id="user">
							<php>$info = $user['info'];</php>
							<tr align="center" id="tr_{$user.openid}">
								<td>
									{$user['openid']}
									<input id="oid" type="hidden" name="oid" value="{$user.openid}"/>
								</td>
								<td>
									{$info['nickname']}
									<input id="yname" type="hidden" name="yname" value="{$info['nickname']}"/>
								</td>
								<td>
									<if condition="$info.subscribe eq 0">
									<span style="color:red;">否</span>
									<else />
									<span style="color:green;">是</span>
									</if>
								</td>
								<td>
									<present name="info.sex">
									<switch name="info.sex" >
									<case value="1"><span style="color:green;">男性</span></case>
									<case value="2"><span style="color:green;">女性</span></case>
									<default />
									<span style="color:green;">未知</span>
									</switch>
									<else/>
									<span style="color:red;">未知</span>
									</present>
								</td>
								<td>
									<present name="info.country">&nbsp;{$info['country']}</present>
									<present name="info.province">&nbsp;<span style="color:blue;">--</span>&nbsp;{$info['province']}</present>
									<present name="info.city">&nbsp;<span style="color:blue;">--</span>&nbsp;{$info['city']}</present>
								</td>
								<td>
									<present name="info.subscribe_time">
									{$info.subscribe_time|date="Y-m-d H:i:s",###}
									<else/>
									<span style="color:red;">无法获取</span>
									</present>
								</td>
								<td>
									<select name="gid" class="act">
										<foreach name="group" item="gp">
										<option value="{$gp.id}" {:is_selected($user['groupid'],$gp['id'])}>{$gp.name}</option>
										</foreach>
									</select>
								</td>
								<td>
									<present name="info.remark">
									<input type="text" value="{$info['remark']}" name="rmk" class="input"/>
									<else/>
									<input type="text" value="" name="rmk" class="input" placeholder="备注"/>
									</present>
								</td>
								<td>
									<button class="btn opCat">确定</button>
								</td>
							</tr>
							</volist>
						</tbody>
					</table>
					<div class="viciao">{$page}</div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        <include file="Public:foot" />
    </body>
<script type="text/javascript">
$(function(){
	$(".opCat").click(function(){
		var obj=$(this).parents("tr");
		$("#openid").val(obj.find("input[name='oid']").val());
		$("#groupid").val(obj.find("select[name='gid']").val());
		$("#remark").val(obj.find("input[name='rmk']").val());
		$.jBox.confirm(
			'是否确定修改【<b>'+obj.find("input[name='yname']").val()+'</b>】的分组与备注?',
			"温馨提示",
			function(v, h, f) {
				if (v == true) {
					commonAjaxSubmit("","#opForm");
				}
			},
			{buttons: {'是': true, '否': false}}
		);
	});
});
</script>
</html>